package priv.mill.server.impl;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import priv.mill.dao.mapper.ComplainMapper;
import priv.mill.entry.Complain;
import priv.mill.server.ComplainService;

@Component
public class ComplainServiceImpl implements ComplainService{

	private static final Logger logger = Logger
			.getLogger(ComplainServiceImpl.class);

	@Autowired
	private ComplainMapper complainMapper;
	
	@Override
	public Complain getComplainById(Integer complainId) {
		return complainMapper.getComplainById(complainId);
	}

	@Override
	public Complain getComplainByEntry(Complain complain) {
		return complainMapper.getComplainByEntry(complain);
	}

	@Override
	public List<Complain> getComplainsByPage(Complain complain) {
		return complainMapper.getComplainsByPage(complain);
	}

	@Override
	public int updateComplain(Complain complain) {
		return complainMapper.updateComplain(complain);
	}

	@Override
	public int insertComplain(Complain complain) {
		return complainMapper.insertComplain(complain);
	}

	@Override
	public int deleteComplain(Integer complainId) {
		return complainMapper.deleteComplain(complainId);
	}
}
